//
//  collectedData.m
//  dataGathering
//
//  Created by apple on 14/12/16.
//  Copyright (c) 2014年 shuili. All rights reserved.
//

#import "collectedData.h"

@implementation collectedData

-(instancetype)initWithAllAttr :(NSString*)name :(NSString*)desc :(NSString*)dataID :(NSString*)createdUserName :(NSString*)createdRealName :(NSString*)createTime :(NSString*)updatedTime :(NSMutableArray*)imageList :(AGSGeometry*)g :(NSString*)mainType :(NSString*)type
{
    self = [super init];
    if(self){
        _name = name;
        _dataDescription = desc;
        _idNumber = dataID;
        _createdUserName = createdUserName;
        _createdRealName = createdRealName;
        _createdTime = createTime;
        _updatedTime = updatedTime;
        _mainType = mainType;
        if(imageList){
            
            _imageList = [[NSMutableArray alloc] initWithArray:imageList];
        }
        _geometry = g;
        _type = type;
    }
    return self;
}

- (void)setNewImageList:(NSArray *)imageList
{
    _imageList = [[NSMutableArray alloc] initWithArray:imageList];
}

-(void)setImageNameList:(NSMutableArray *)imageNameList
{
    _imageNameList = [[NSMutableArray alloc] initWithArray:imageNameList];;
}

- (BOOL)isEqual:(id)object
{
    collectedData *data = (collectedData*)object;
    if([_idNumber isEqualToString:[data idNumber]]){
        return YES;
    } else {
        return NO;
    }
}

@end
